home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
oper_sys
/
presto
/
prest1_0.lha
/
src
/
mips_lock.s
< prev
next >
Wrap
Text File
|
1991-12-11
|
502b
|
27 lines
/*
* Part of an atomic test-and-set implementation for
* the atomicless MIPS architecture. The other part
* of this is in scheduler_sig.c, where signals
* that are delivered in the middle of this code
* will cause it to restart.
*
* From the original by Raj Vaswani.
*/
#include <mips/asm.h>
#include <mips/regdef.h>
.align 4
.set noreorder
LEAF(atomic_test_and_set)
lw v0, 0(a0)
li t1, 1
j ra
sw t1, 0(a0)
EXPORT(atomic_test_and_set_rcs)
END(atomic_test_and_set)
.set reorder